package com.zk.code.net;

import android.content.Context;

import com.example.txjc.Util.FunUtil;

import org.apache.commons.codec.binary.Hex;

import java.util.UUID;

/**
 * Created by zhoukaich on 2018/8/13.
 */

public class NetUtil {
    //上传图片
    public static void uploadPic(byte[] imgData, Context context){
        //先随机生成俩校验位
        int len = imgData.length;
        String deviceId = FunUtil.getDeviceId(context);
        String str = "5A A5"+Integer.toHexString(len)+" "+UUID.randomUUID().toString()+" 05 "+" b4 "+"00 "+Hex.encodeHex(imgData)+" 07 01 "+"96";
        UdpClient.sendMessage(str);
    }
}
